/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package redsocial.forms;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import redSocial.sessions.UsuarioFacadeRemote;

/**
 *
 * @author Curro
 */
@ManagedBean
@RequestScoped
public class PasswordBean {
     @EJB
    private UsuarioFacadeRemote usuarioFacade;
    private String password1;

    public String getMensaje() {
        return mensaje;
    }

    public void setMensaje(String mensaje) {
        this.mensaje = mensaje;
    }
    private String password2;
    private String mensaje;

    public String getPassword1() {
        return password1;
    }

    public void setPassword1(String password1) {
        this.password1 = password1;
    }

    public String getPassword2() {
        return password2;
    }

    public void setPassword2(String password2) {
        this.password2 = password2;
    }
    
    /** Creates a new instance of PasswordBean */
    public PasswordBean() {
    }

    public String doActivation() {
        if (!password1.equals(password2)) {
            mensaje = "Las contraseñas introducidas no coinciden";
            return "password";
        } else {
            return "index";

        }

    }
}
